package org.alvin.i18n.ui;

import com.github.houbb.opencc4j.util.ZhConverterUtil;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

public class SimpleCnToTraditionalUtils {

    public static void main(String[] args) {
        String original = "";

        String result = ZhConverterUtil.toTraditional(original);
        System.out.println(result);
    }

//    public static void main(String[] args) throws IOException {
////        String original = "生命不息，奮鬥不止";
////        String result = ZhConverterUtil.toSimple(original);
////        System.out.println(result);
////
////        original = "生命不息，奋斗不止";
////        result = ZhConverterUtil.toTraditional(original);
////        System.out.println(result);
////        Path dir = Paths.get("D:\\tangzhichao\\new_workspace\\xiaolan\\clientcharge\\xiaolan_app_v3\\locale\\zh");
//        Path dir = Paths.get("D:\\tangzhichao\\workspace\\xiaolan\\electrombileweb\\xblue_v1\\src\\locale\\zh");
//        Path zhhk = dir.getParent().resolve("zhhk");
//        if (!Files.exists(zhhk)) {
//            Files.createDirectories(zhhk);
//        }
//        Files.list(dir).forEach(item -> {
//            Path tmp = zhhk.resolve(item.getFileName());
//            String content = null;
//            try {
//                content = new String(Files.readAllBytes(item));
//                content = ZhConverterUtil.toTraditional(content);
//                Files.write(tmp, content.getBytes());
//            } catch (IOException e) {
//                throw new RuntimeException(e);
//            }
//        });
//    }
}
